<?php
class LogsController extends AppController {

	var $name = 'Logs';
	
	
	function isAuthorized(){
		if($this->Auth->user('csoport') == 1){		//admin jogosultságú júzerek
			return true;
		}
		return false;		//minden más tiltva
	}

	function index() {
		$this->Log->recursive = 0;
		$this->set('logs', $this->paginate());
		return true;
	}

	function view($id = null) {
		if (!$id) {
			$this->Session->setFlash(__('Invalid Log.'));
			return $this->redirect(array('action'=>'index'));
		}
		$this->set('log', $this->Log->read(null, $id));
		return true;
	}
}
?>